<%- include header.ejs%>
<div style="background-color: #9c94ff;text-align: center;padding-top: 10px;padding-bottom: 10px">
    <span style="font-size: 20px;"><%= __('editMyData').edit %><span>
</div>
<div style="background-color: white;border: 1px solid #ffffff;border-radius: 6px;margin-top: 20px;padding: 3%;font-size:  16px">
    <div>
        <div style="margin-top: 20px;width: 30%;float: left">
            <img class="img-rounded"  style="width: 160px;height: 160px" src="<%- user.headSrc %>">
            <div class="file-box">
                <form action="/uploadHead"  method="post" enctype="multipart/form-data" style="margin-top: 20px">
                    <input type='text' name='textfield' id='textfield' class='txt' style="margin-bottom: 0px;width: 50%"/>
                    <input type='button' class='btn' value='<%= __('editMyData').browse %>' />
                    <input type="file" name="file" class="file" id="fileToUpload" size="28" onchange="document.getElementById('textfield').value=this.value" />
                    <input type="submit" name="submit" class="btn" value="<%= __('editMyData').upload %>" />
                </form>

            </div>
        </div>

        <div style="width: 60%;float: left;margin-left: 5%">
            <form class="registerform form-horizontal" method="post">
                <table width="100%" style="table-layout:fixed;">
                    <tr>
                        <td class="need" style="width:10px;line-height: 35px">*</td>
                        <td style="width:150px;line-height: 30px"><%= __('partnerCenter').nickname %>：</td>
                        <td style="width:205px;"><input type="text" value="<%- user.nickname%>" name="nickname" class="inputxt"  datatype="s2-15" errormsg="昵称为2-15个任意字符！" /></td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>
                    <tr>
                        <td class="need" style="width:10px;line-height: 25px">*</td>
                        <td style="width:70px;"><%= __('partnerCenter').gender %>：</td>
                        <td style="width:205px;">
                            <% if(user.gender==1){%>
                            <%= __('partnerCenter').male %>:<input type="radio" name="gender" value="1" checked="checked" datatype="*">
                            <%= __('partnerCenter').woman %>:<input type="radio" name="gender" value="0">
                            <% }else{%>
                            <%= __('partnerCenter').male %>:<input type="radio" name="gender" value="1" datatype="*">
                            <%= __('partnerCenter').woman %>:<input type="radio" name="gender" value="0" checked="checked">
                            <% } %>
                        </td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>
                    <tr>
                        <td class="need" style="width:10px;line-height: 35px">*</td>
                        <td style="width:300px;line-height: 30px"><%= __('partnerCenter').age %>：</td>
                        <td style="width:205px;">
                            <input type="text" value="<%- user.age%>" name="age" class="inputxt" datatype="n1-2" errormsg="年龄为0-99"/></td>
                        </td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>

                    <tr>
                        <td class="need" style="width:10px;line-height: 35px">*</td>
                        <td style="width:70px;line-height: 30px"><%= __('findPartner').nationality %>：</td>
                        <td style="width:205px;">
                            <select name="country" datatype="*">
                                <% if(user.country=='中国'){%>
                                <option value="中国" selected="selected"><%= __('findPartner').china %></option>
                                <%}else{%>
                                <option value="中国"><%= __('findPartner').china %></option>
                                <%}%>
                                <% if(user.country=='美国'){%>
                                <option value="美国" selected="selected"><%= __('findPartner').america %></option>
                                <%}else{%>
                                <option value="美国"><%= __('findPartner').america %></option>
                                <%}%>
                                <% if(user.country=='英国'){%>
                                <option value="英国" selected="selected"><%= __('findPartner').england %></option>
                                <%}else{%>
                                <option value="英国"><%= __('findPartner').england %></option>
                                <%}%>
                                <% if(user.country=='德国'){%>
                                <option value="德国" selected="selected"><%= __('findPartner').germany %></option>
                                <%}else{%>
                                <option value="德国"><%= __('findPartner').germany %></option>
                                <%}%>
                                <% if(user.country=='法国'){%>
                                <option value="法国" selected="selected"><%= __('findPartner').france %></option>
                                <%}else{%>
                                <option value="法国"><%= __('findPartner').france %></option>
                                <%}%>
                                <% if(user.country=='日本'){%>
                                <option value="日本" selected="selected"><%= __('findPartner').japan %></option>
                                <%}else{%>
                                <option value="日本"><%= __('findPartner').japan %></option>
                                <%}%>
                                <% if(user.country=='韩国'){%>
                                <option value="韩国" selected="selected"><%= __('findPartner').korea %></option>
                                <%}else{%>
                                <option value="韩国"><%= __('findPartner').korea %></option>
                                <%}%>
                            </select>
                        </td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>
                    <tr>
                        <td class="need" style="width:10px;line-height: 35px">*</td>
                        <td style="width:70px;line-height: 30px"><%= __('partnerCenter').m_language %>：</td>
                        <td style="width:205px;">
                            <select  name="language" datatype="*">
                                <% datas.forEach(function(data,index){%>
                                <% if(data.platename==user.language){%>
                                <option value="<%- data.platename%>" selected="selected"><%- data.platename%></option>
                                <%}else{%>
                                <option value="<%- data.platename%>"><%- data.platename%></option>
                                <%}%>
                                <%})%>
                            </select>
                        </td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>
                    <tr>
                        <td class="need" style="width:10px;line-height: 35px">*</td>
                        <td style="width:70px;line-height: 30px"><%= __('partnerCenter').learn_language %>：</td>
                        <td style="width:205px;">
                            <select  name="studylanguage" datatype="*">
                                <% datas.forEach(function(data,index){%>
                                <% if(data.platename==user.studylanguage){%>
                                <option value="<%- data.platename%>" selected="selected"><%- data.platename%></option>
                                <%}else{%>
                                <option value="<%- data.platename%>"><%- data.platename%></option>
                                <%}%>
                                <%})%>
                            </select>

                        </td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>
                    <tr>
                        <td class="need" style="width:10px;line-height: 35px">*</td>
                        <td style="width:70px;line-height: 30px"><%= __('partnerCenter').addr %>：</td>
                        <td style="width:205px;"><input type="text" value="<%- user.nowcity%>" name="nowcity"  class="inputxt" datatype="s1-30" errormsg="为1-30个任意字符！"/></td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>
                    <tr>
                        <td class="need" style="width:10px;line-height: 35px">*</td>
                        <td style="width:70px;line-height: 30px"><%= __('editMyData').wechat %>：</td>
                        <td style="width:205px;"><input type="text" value="<%- user.wechat%>" name="wechat"  class="inputxt" datatype="s5-12" errormsg="为5-12个字母和数字组成！"/></td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>
                    <tr>
                        <td class="need" style="width:10px;line-height: 35px">*</td>
                        <td style="width:70px;line-height: 30px"><%= __('editMyData').email %>：</td>
                        <td style="width:205px;"><input type="email" value="<%- user.email%>" class="inputxt" name="email" datatype="e" errormsg="请输入正确的邮箱 "/></td>
                        <td><div class="Validform_checktip"></div></td>
                    </tr>
                    <tr>
                        <td class="need"></td>
                        <td><%= __('editMyData').describe %>：</td>
                        <td colspan="2">
                            <textarea tip="" altercss="gray" class="gray" name="describe" value=""><%-user.describe?user.describe:''%></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td class="need"></td>
                        <td></td>
                        <td colspan="2" style="padding:10px 0 18px 0;">
                            <input class="btn btn-primary" type="submit" value="<%= __('editMyData').submit %>" style="float: right">
                        </td>
                    </tr>
                </table>
            </form>
        </div>
        <div style="clear: both"></div>
    </div>
</div>


<%- include footer.ejs%>
<script type="text/javascript">
    $(function(){
        //$(".registerform").Validform();  //就这一行代码！;

        $(function(){
            //$(".registerform").Validform();  //就这一行代码！;

            $(".registerform").Validform({
                tiptype:2
            })


        })
    })
</script>